package org.flowable.pz.entity.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;
import org.flowable.pz.serialize.FlowableInstanceStatusDescriptionSerialize;

import java.util.Date;
import java.util.List;

/**
 * 流程实例实体类
 **/
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class FlowableProcessDto {

    //流程实例 id
    private String processInstanceId;

    //流程定义名称
    private String processDefinitionName;

    //状态 根据 FlowableStatusEnum 中枚举
    private Integer status;

    //启动时间
    private Date startTime;

    //结束时间
    private Date endTime;

    //发起人
    private String starter;

    //状态描述
    @JsonSerialize(nullsUsing = FlowableInstanceStatusDescriptionSerialize.class)
    private String statusDescription;

    //当前节点
    List<FlowableTaskDto> currentTaskList;

}
